{$this->layout()->content}

<script type="text/javascript">

$('div.dialog form').submit(function() {
	$.post(this.action, $(this).serialize(), function(result) {
		if (result) {
			$('div.dialog').html(result);
		} else {
			$('div.dialog').dialog('close');
			$('div.content').load(document.location.href);
		}
	});
	return false;
});

if (!$('div.dialog').dialog('isOpen')) {
	$('div.dialog').dialog('open');
	$('div.dialog').dialog('option', 'title', '{$this->navigation()->findOneBy("active", 1)|t}');
}

</script>